package com.jgsu.sell.dataobject;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.jgsu.sell.enums.OrderStatusEnum;
import com.jgsu.sell.enums.PayStatusEnum;
import com.jgsu.sell.utils.serializer.Date2LongSerializer;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.criterion.Order;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 描述:
 * 订单主表
 *
 * @author lqd12
 * @create 2018-08-18 19:40
 */
@Data
@Entity
@DynamicUpdate
public class OrderMaster {
    @Id
    private String orderId;
    /**
     * 订单收件人姓名
     */
    private String buyerName;
    /**
     * 电话
     */
    private String buyerPhone;
    /**
     * 地址
     */
    private String buyerAddress;
    /**
     * openid
     */
    private String buyerOpenid;
    /**
     * 订单总额
     */
    private BigDecimal orderAmount;
    /**
     * 订单状态
     */
    private Integer orderStatus = OrderStatusEnum.NEW.getCode();
    /**
     * 支付状态
     */
    private Integer payStatus = PayStatusEnum.WAIT.getCode();
    private Date createTime;
    private Date updateTime;
}